﻿<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<%template _header%>
<%namespace YouHP.Model%>
<%namespace YouHP.Utility%>
<%namespace YouHP.Model.Group%>
<%namespace YouHP.BLL%>
<%namespace System.Collections.Generic%>
<script language="javascript" src="/support/editor/script_common.js"></script>
<script language="javascript" src="/support/editor/editor_function.js"></script>
    <link rel="stylesheet" href="/support/common/jquery-ui.css" type="text/css" />
    <script type="text/javascript" src="/support/common/jquery.js"></script>
    <script type="text/javascript" src="/support/common/ui.core.js"></script>
    <script type="text/javascript" src="/support/common/ui.draggable.js"></script> 
    <script type="text/javascript" src="/support/common/ui.resizable.js"></script> 
    <script type="text/javascript" src="/support/common/ui.dialog.js"></script> 
<div class="box">
    <div class="caption">{TopicData.Title}</div>
</div>	

<div class="box">
<div class="content">
    <div style="float:left;">
        <%csharp%>TempUrl = "/BBS/ReplyAdd.aspx?gid=" + GroupData.Id + "&tid=" + TopicData.Id; <%/csharp%>
        <a href="{this.GetUrl(TempUrl)}"><img src="/support/alpha/images/reply.gif" /></a>&nbsp;
        <%csharp%> TempUrl = "/BBS/TopicAdd.aspx?gid=" + GroupData.Id; <%/csharp%>
        <a href="{this.GetUrl(TempUrl)}" ><img src="/support/alpha/images/newtopic.gif" height="30px;"/></a>
    </div>
    
		<div style="float:right; height:30px;">
		  <div class="pages">
			{PagingString}
			</div>
		</div>
		
		<div style="clear:both;"></div>
		</div>
</div>





<%csharp%>if(PageIndex==1) { <%/csharp%>
<div class="box">
    <table border="0" cellpadding="0" cellspacing="0" width="970px">
     
        <tr>
            <td class="user">
   
                            <%csharp%>TempUrl = "/Profile/Index.aspx?uid=" + TopicData.PostUserId; <%/csharp%>
                       <a href="{this.GetUrl(TempUrl)}" class="user_img" target="_blank" onmouseover='model_popup.Popup_Onclick(this,arguments[0]); return false;onmouseout = model_popup.TimerSwitch("EOut"); '><img src="{TopicData.PostAvatar}" width="70" height="70"  class="pic"/></a>
                     
                       <p><a target="_blank" href="{this.GetUrl(TempUrl)}">{TopicData.PostUserName}</a></p>
                       
                        <%csharp%>
                        string province=UserBLL.Instance.GetUserInfo(TopicData.PostUserId).Province;
                        string city=UserBLL.Instance.GetUserInfo(TopicData.PostUserId).City;
                        int credits = UserBLL.Instance.GetUserInfo(TopicData.PostUserId).UserCredits;
                        <%/csharp%>
                        <%if province!=""||city!=""%>
                        <p>({province}&nbsp;{city})</p>
                        <%/if%>
                        <p>积分:{credits}</p>
			
                       
                      <p>
                      年龄: <%csharp%>if(TopicData.PostAge > 0&&TopicData.PostAge<208) {<%/csharp%>{TopicData.PostAge}<%csharp%>}else{<%/csharp%>未知<%csharp%>}<%/csharp%>
                      性别: {TopicData.PostGender}
                      </p>
                      
                   <ul>
                  <%csharp%>TempUrl = "/Profile/Index.aspx?uid=" + TopicData.PostUserId; <%/csharp%>
                   <li><div class="btn-left"><div class="btn-right"><a href="{GetUrl(TempUrl)}" target="_blank"><span>病情系统</span></a></div></div></li>
                   

                    <li><div class="btn-left"><div class="btn-right"><%if UserData.Id!=TopicData.PostUserId%><a href="javascript:if({UserData.Id}<=0) alert('请先登录！'); else showFriendRequestDialog('{TopicData.PostUserId}','{TopicData.PostUserName}','{TopicData.PostAvatar}');"><span>加为好友</span></a><%else%><span>加为好友</span><%/if%></div></div></li>
                   
    
                    <li><div class="btn-left"><div class="btn-right"><%if UserData.Id!=TopicData.PostUserId%><a href="javascript:if({UserData.Id}<=0) alert('请先登录！');else showMsgSendingDialog({TopicData.PostUserId});"><span>发送消息</span></a><%else%><span>发送消息</span><%/if%></div></div></li>
                   
                   
                    <li><div class="btn-left"><div class="btn-right"><%if UserData.Id!=TopicData.PostUserId%><a href="javascript:if({UserData.Id}<=0) alert('请先登录！');else showActionSendingDialog({TopicData.PostUserId});"><span>打个招呼</span></a><%else%><span>打个招呼</span><%/if%></div></div></li>
                    </ul>
              

            </td>
            <td class="usermenu">

                <div style="float:left;">     
                    <span width="180">
                        <%csharp%>TempUrl = TopicData.PostTime.ToString("yyyy-MM-dd HH:mm"); <%/csharp%>
                        发表时间: {TempUrl}
                    </span>
                    
                    <span width="160">
                        <%csharp%>TempUrl = TopicData.UpdateTime.ToString("yyyy-MM-dd HH:mm"); <%/csharp%>
                        最后修改: {TempUrl}
                    </span>
                   
                    <span width="60" align="right"><b>楼主</b></span>
                    
                    </div>
                <div style="float:right;">
                    <%csharp%>if(CanBanPoster(TopicData)) { <%/csharp%>
                    <span width="60" align="right">
                    <%csharp%>TempUrl = "/BBS/UserAdmin.aspx?Posterid=" + TopicData.PostUserId+"&gid="+GroupData.Id; <%/csharp%>
                    [<a href="{this.GetUrl(TempUrl)}"><font style="color:Green;">禁言</font></a>]
                    </span>
                    <%csharp%> } <%/csharp%>
                  <%csharp%>if(CanEdit(TopicData)) { <%/csharp%>
                    <span width="60" align="right">
                    <%csharp%>TempUrl = "/BBS/TopicEdit.aspx?gid=" + GroupData.Id + "&tid=" + TopicData.Id; <%/csharp%>
                    [<a href="{this.GetUrl(TempUrl)}"><font style="color:Green;">修改</font></a>]
                    </span>
                    <%csharp%> } <%/csharp%>
                    
                    <%csharp%>if(CanDelete(TopicData)) { <%/csharp%>
                    <span width="60" align="right">
                    <%csharp%>TempUrl = "/BBS/TopicDel.aspx?gid=" + GroupData.Id + "&tid=" + TopicData.Id; <%/csharp%>
                    [<a href="#" onclick="if(window.confirm('删除帖子将同时删除该帖子全部回复，确定删除？')) window.location.href='{this.GetUrl(TempUrl)}';"><font style="color:Green;">删除</font></a>]
                  
                    </span>
                    <%csharp%> } <%/csharp%>
                    
                    <%csharp%>if(CanReply(TopicData)) { <%/csharp%>
                    <span width="60" align="right">
                     [<a href="javascript:if({UserData.Id}<=0) alert('请先登录！');else showShareBBSTopicDialog({TopicData.Id});"><font style="color:Green; font-weight:bold;">分享该帖子</font></a>]
                    <%csharp%>TempUrl = "/BBS/ReplyAdd.aspx?gid=" + GroupData.Id + "&tid=" + TopicData.Id; <%/csharp%>
                    [<a href="{this.GetUrl(TempUrl)}"><font style="color:Green;">回复</font></a>]
                    </span>
                    <%csharp%> } <%/csharp%> 
                 </div>   
              
              <%csharp%>
              PatientRecordInfo PData = PatientBLL.Instance.GetPatientRecordInfo(TopicData.PostUserId);
              List<SymptomHistoryInfo> PrimarySymptomList = PatientSymptomBLL.Instance.GetPrimarySymptoms(PData.Id);
              List<TreatmentHistoryInfo> TreatmentList = PatientTreatmentBLL.Instance.GetBindingTreatmentList(PData.Id);
              <%/csharp%>   
             <div style="clear:both;" class="diseaseInfo">
             
            <%csharp%>TempUrl = "/Disease.aspx?id=" + PData.DiseaseId; <%/csharp%>
            <span>所患疾病：</span><%if PData.Id<=0%><font color=green>未知</font>&nbsp;<%else%><a href="{this.GetUrl(TempUrl)}">{DiseaseBLL.Instance.GetDiseaseInfo(PData.DiseaseId).Name}</a>&nbsp;<%/if%>
             <span>主要症状：</span>
             <%if PrimarySymptomList.Count<=0%>
             <font color=green>未知</font>&nbsp;
             <%else%>
             <%csharp%>foreach(SymptomHistoryInfo info in PrimarySymptomList){<%/csharp%> 
             <%csharp%>TempUrl = "/Symptom.aspx?id=" + info.SymptomId; <%/csharp%>
             <a href="{this.GetUrl(TempUrl)}">{info.SymptomName}</a>&nbsp;
             <%csharp%>}<%/csharp%> 
             <%/if%>
             
             <span>正在使用的治疗：</span>
             <%if TreatmentList.Count<=0%>
             <font color=green>未知</font>&nbsp;
             <%else%>
               <%csharp%>foreach(TreatmentHistoryInfo info in TreatmentList){<%/csharp%> 
             <a href="{this.GetUrl(TempUrl)}">{info.TreatmentName}</a>&nbsp;
             <%csharp%>}<%/csharp%> 
             <%/if%>
              <%csharp%>TempUrl = "/Profile/Index.aspx?uid=" + TopicData.PostUserId; <%/csharp%>
             &nbsp;&nbsp;<a href="{this.GetUrl(TempUrl)}" class="userlink">查看他（她）的病情系统</a>

             </div>
             <div class="content"><b>{TopicData.Title}</b><br />{TopicData.Body}
             <br /><%csharp%>if(!string.IsNullOrEmpty(TopicData.TopicFile)) { <%/csharp%> 附件：<%csharp%>TempUrl = "http://www.youhp.com" + TopicData.TopicFile; <%/csharp%><a href="{TopicData.TopicFile}" style="text-decoration:underline" >{FileRealName}</a>
             <%csharp%> } <%/csharp%>
             <%csharp%>if(tagArrSplit != null) { <%/csharp%>
			<div class="tags">
			<font color=black>搜索更多的相关文章:</font>&nbsp
			<%csharp%>for(int i=0; i<tagArrSplit.Length; i++){
			 TempUrl = "/Tag.aspx?tagname="+tagArrSplit[i];    
			<%/csharp%>
			<a href="{this.GetUrl(TempUrl)}" ><font color="red">{tagArrSplit[i]}</font></a>&nbsp
			<%csharp%>}<%/csharp%>
			</div>
			<%csharp%>}<%/csharp%>
             </div>
    

    </td></tr>
  
    </table>
</div>
<%csharp%> } <%/csharp%>


<%csharp%>foreach(ReplyInfo item in ReplyDataList){ <%/csharp%>

<div class="box">
    <table border="0" cellpadding="0" cellspacing="0" width="970px">
     
        <tr>
            <td class="user">
   
                            <%csharp%>TempUrl = "/Profile/Index.aspx?uid=" + item.PostUserId; <%/csharp%>
                       <a href="{this.GetUrl(TempUrl)}" class="user_img" target="_blank"  onmouseover='model_popup.Popup_Onclick(this,arguments[0]); return false;onmouseout = model_popup.TimerSwitch("EOut"); '><img src="{item.ReplyAvatar}" width="70" height="70"  class="pic"/></a>
                        
                       <p><a target="_blank" href="{this.GetUrl(TempUrl)}">{item.PostUserName}</a></p>
                       
                         <%csharp%>
                        string province=UserBLL.Instance.GetUserInfo(item.PostUserId).Province;
                        string city=UserBLL.Instance.GetUserInfo(item.PostUserId).City;
                        int credits=UserBLL.Instance.GetUserInfo(item.PostUserId).UserCredits;
                        <%/csharp%>
                        <%if province!=""||city!=""%>
                        <p>({province}&nbsp;{city})</p>
                        <%/if%>
                        <p>积分:{credits}</p>
                      <p>
                      年龄: <%csharp%>if(item.ReplyAge > 0&&item.ReplyAge<208) {<%/csharp%>{item.ReplyAge}<%csharp%>}else{<%/csharp%>未知<%csharp%>}<%/csharp%>
                      性别: {item.ReplyGender}
                      </p>
                      
                   <ul>
                  <%csharp%>TempUrl = "/Profile/Index.aspx?uid=" + item.PostUserId; <%/csharp%>
                   <li><div class="btn-left"><div class="btn-right"><a href="{GetUrl(TempUrl)}" target="_blank"><span>病情系统</span></a></div></div></li>
                   
           
                    <li><div class="btn-left"><div class="btn-right"><%if UserData.Id!=item.PostUserId%><a href="javascript:showFriendRequestDialog('{item.PostUserId}','{item.PostUserName}','{item.ReplyAvatar}');"><span>加为好友</span></a><%else%><span>加为好友</span><%/if%></div></div></li>
                   
               
                    <li><div class="btn-left"><div class="btn-right"><%if UserData.Id!=item.PostUserId%><a href="javascript:if({UserData.Id}<=0) alert('请先登录！');else showMsgSendingDialog({item.PostUserId});"><span>发送消息</span></a><%else%><span>发送消息</span><%/if%></div></div></li>
                   
                   
                    <li><div class="btn-left"><div class="btn-right"><%if UserData.Id!=item.PostUserId%><a href="javascript:showActionSendingDialog({item.PostUserId});"><span>打个招呼</span></a><%else%><span>打个招呼</span><%/if%></div></div></li>
                    </ul>
              

            </td>
            <td class="usermenu">

                <div style="float:left;">     
                    <span width="180">
                        <%csharp%>TempUrl = item.PostTime.ToString("yyyy-MM-dd HH:mm"); <%/csharp%>
                        发表时间: {TempUrl}
                    </span>
                    
                    <span width="160">
                        <%csharp%>TempUrl = item.UpdateTime.ToString("yyyy-MM-dd HH:mm"); <%/csharp%>
                        最后修改: {TempUrl}
                    </span>
                   
                    <span width="60" align="right"><b>第 {item.FloorNo} 楼</b></span>
                    </div>
          <%if item.IsDel==0%>
                <div style="float:right;">
                   <%csharp%>if(CanBanPoster(item)) { <%/csharp%>
                    <span width="60" align="right">
                   <%csharp%>TempUrl = "/BBS/UserAdmin.aspx?Posterid=" + item.PostUserId+"&gid="+GroupData.Id; <%/csharp%>
                    [<a href="{this.GetUrl(TempUrl)}"><font style="color:Green;">禁言</font></a>]
                    </span>
                    <%csharp%> } <%/csharp%>
                  <%csharp%>if(CanEdit(item)) { <%/csharp%>
                    <span width="60" align="right">
                   <%csharp%>TempUrl = "/BBS/ReplyEdit.aspx?gid=" + GroupData.Id + "&tid=" + item.TopicId+"&rid="+item.Id; <%/csharp%>
                    [<a href="{this.GetUrl(TempUrl)}"><font style="color:Green;">修改</font></a>]
                    </span>
                    <%csharp%> } <%/csharp%>
                    
                    <%csharp%>if(CanDelete(item)) { <%/csharp%>
                    <span width="60" align="right">
                      <%csharp%>TempUrl = "/BBS/ReplyDel.aspx?gid=" + GroupData.Id + "&tid=" + item.TopicId+"&rid="+item.Id; <%/csharp%>
                    [<a href="{this.GetUrl(TempUrl)}"><font style="color:Green;">删除</font></a>]
                    </span>
                    <%csharp%> } <%/csharp%>
                    
                    <%csharp%>if(CanReply(item)) { <%/csharp%>
                    <span width="60" align="right">
                    <%csharp%>TempUrl = "/BBS/ReplyAdd.aspx?gid=" + GroupData.Id + "&tid=" + item.TopicId+"&rid="+item.Id; <%/csharp%>
                    [<a href="{this.GetUrl(TempUrl)}"><font style="color:Green;">回复</font></a>]
                    </span>
                    
                     <span width="60" align="right">
                    <%csharp%>TempUrl = "/BBS/ReplyAdd.aspx?gid=" + GroupData.Id + "&tid=" + item.TopicId+"&rid="+item.Id+"&quote=1"; <%/csharp%>
                    [<a href="{this.GetUrl(TempUrl)}"><font style="color:Green;">引用</font></a>]
                    </span>
                    <%csharp%> } <%/csharp%> 
                    

                    
                 </div>   
           <%/if%>      

              <%csharp%>
              PatientRecordInfo PData = PatientBLL.Instance.GetPatientRecordInfo(item.PostUserId);
              List<SymptomHistoryInfo> PrimarySymptomList = PatientSymptomBLL.Instance.GetPrimarySymptoms(PData.Id);
              List<TreatmentHistoryInfo> TreatmentList = PatientTreatmentBLL.Instance.GetBindingTreatmentList(PData.Id);
              <%/csharp%>   
             
             <div style="clear:both;" class="diseaseInfo">
             
            <%csharp%>TempUrl = "/Disease.aspx?id=" + PData.DiseaseId; <%/csharp%>
            <span>所患疾病：</span><%if PData.Id<=0%><font color=green>未知</font>&nbsp;<%else%><a href="{this.GetUrl(TempUrl)}">{DiseaseBLL.Instance.GetDiseaseInfo(PData.DiseaseId).Name}</a>&nbsp;<%/if%>
             <span>主要症状：</span>
             <%if PrimarySymptomList.Count<=0%>
             <font color=green>未知</font>&nbsp;
             <%else%>
             <%csharp%>foreach(SymptomHistoryInfo info in PrimarySymptomList){<%/csharp%> 
             <%csharp%>TempUrl = "/Symptom.aspx?id=" + info.SymptomId; <%/csharp%>
             <a href="{this.GetUrl(TempUrl)}">{info.SymptomName}</a>&nbsp;
             <%csharp%>}<%/csharp%> 
             <%/if%>
             
             <span>正在使用的治疗：</span>
             <%if TreatmentList.Count<=0%>
             <font color=green>未知</font>&nbsp;
             <%else%>
               <%csharp%>foreach(TreatmentHistoryInfo info in TreatmentList){<%/csharp%> 
             <a href="{this.GetUrl(TempUrl)}">{info.TreatmentName}</a>&nbsp;
             <%csharp%>}<%/csharp%> 
             <%/if%>
              <%csharp%>TempUrl = "/Profile/Index.aspx?uid=" + item.PostUserId; <%/csharp%>
             &nbsp;&nbsp;<a href="{this.GetUrl(TempUrl)}" class="userlink">查看他（她）的病情系统</a>

             </div>
             
             <div class="content">
                    <%csharp%>if(item.ReplyFloorNo > 0 && item.ReplyFloorNo < allRepliesCount) { <%/csharp%>

                    <b>[回复第{item.ReplyFloorNo} 楼 {AllReplyDataList[item.ReplyFloorNo-1].PostUserName}]</b>
                     <%csharp%> } <%/csharp%>
                    <br /> 
                    <%if item.IsDel==1%>该回复已被删除<%else%>{item.Body}<%/if%>
                    <br />
                    <%csharp%>if((!string.IsNullOrEmpty(item.ReplyFile))&&(item.IsDel!=1)) { <%/csharp%><img src="http://www.logozhizuowang.cn/images/fhzl/file/zip.gif" /> 附件：<%csharp%>TempUrl = "http://www.youhp.com" + item.ReplyFile; <%/csharp%><a href="{item.ReplyFile}" style="text-decoration:underline" >{item.ReplyFileName}</a>
             <%csharp%> } <%/csharp%>
            </div>
    

    </td></tr>
  
    </table>
</div>


<%csharp%> } <%/csharp%>

<div class="box">
<div class="content">
    <div style="float:left;">
        <%csharp%>TempUrl = "/BBS/ReplyAdd.aspx?gid=" + GroupData.Id + "&tid=" + TopicData.Id; <%/csharp%>
        <a href="{this.GetUrl(TempUrl)}"><img src="/support/alpha/images/reply.gif" /></a>&nbsp;
        <%csharp%> TempUrl = "/BBS/TopicAdd.aspx?gid=" + GroupData.Id; <%/csharp%>
        <a href="{this.GetUrl(TempUrl)}" ><img src="/support/alpha/images/newtopic.gif" height="30px" /></a>
    </div>
    
		<div style="float:right;height:30px;">
		  <div class="pages">
			{PagingString}
			</div>
		</div>
		
		<div style="clear:both;"></div>
	</div>
</div>
<div style="clear:both;"></div>

   <%csharp%>TempUrl = ModuleCtrl.Header4("reply","快速回复",false,false); <%/csharp%>
        {TempUrl}   
            
            <div class="content" style="text-align:center">
            <div style="margin:0 auto;">
            
            <%csharp%>if(UserData.Id > 0) { <%/csharp%>
               
               <%csharp%>TempUrl="/BBS/ReplyAdd.aspx?gid="+GroupData.Id+"&tid="+TopicData.Id;<%/csharp%>
                <form id="replyform" name="replyform" action="{this.GetUrl(TempUrl)}" method="post">
                    
                <input type="hidden" name="uid" value="" />
                <table width="500px"><tr><td>

                     <textarea id="uchome-ttHtmlEditor" name="rbody" cols="90" rows="15" style="display:none"></textarea> 
                     <iframe src="/support/editor/editor.htm" name="uchome-ifrHtmlEditor" id="uchome-ifrHtmlEditor" scrolling="no" border="0" frameborder="0" style="width:600px;border: 1px solid #C5C5C5;" height="300"></iframe>
                     <span>内容长度必须在{Config.ReplyMinSize}-{Config.ReplyMaxSize}之间</span>  
                </td></tr>
                <tr height="15"><td></td></tr>
                <tr><td align="right">
                 <span  onmouseout="this.className='new_sbt'" id="submitButton" onmouseover="this.className='new_sbt_h'" onclick="javascript:edit_save();this.disabled = true;_$('replyform').submit();" class="new_sbt">提交</span>
                </td></tr></table>
                
                </form>    
                
                <br />
                
                <span id="cmtstate"></span>
                
                <%csharp%> } else { <%/csharp%>
            <%csharp%>TempUrl = "/User/Login.aspx"; <%/csharp%>
            <b>我要说两句</b>.... (请在<a href="{this.GetUrl(TempUrl)}"><b>登录</b></a>后发表回复)
            <%csharp%> } <%/csharp%>
                
                </div>
            </div>
            
            
    <%csharp%>TempUrl = ModuleCtrl.Footer("reply"); <%/csharp%>
    {TempUrl}  
      <script language="javascript" src="/support/Popup/ModelPopup.js"></script>
      <div id="DIALOG"><iframe FRAMEBORDER=0 SCROLLING=NO ></iframe></div>
      <script type="text/javascript" src="/support/Alpha/Js/float.js"></script>

<%template _footer%>		
